package cn.ecut.services;

import cn.ecut.dao.CommentDao;
import cn.ecut.model.Comment;

import java.sql.Timestamp;
import java.util.List;

public class Commentservices {
    private CommentDao commentDao= new CommentDao();
    public boolean AddComment(Comment comment){
        comment.setTime(new Timestamp(System.currentTimeMillis()));
        return commentDao.AddComment(comment);
    }
    public List<Comment> CommentList(Integer begin,String newsid){
        if(begin!=0)begin+=1;
        return commentDao.CommentList(begin,newsid);
    }
    public boolean AddLikes(String id){
        return commentDao.AddLikes(id);
    }
}
